package com.trtan.hr.dao;

import com.trtan.hr.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RoleDao {
    List<Role> selectAllRoles();

    long getTotal(String name);

    List<Role> getAllRoles(@Param("page") Integer page, @Param("size") Integer size, @Param("name") String roleName);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectiveByUserId(Integer user_id);

}